import 'circle_detail_model.dart';

class OfficialData {
  String approvalStatus;
  String itemSku;
  List<String> labels;
  int num;
  bool orderable;
  String pdpVideoUrl;
  String picture;
  PriceData priceData;
  String productCode;
  String productName;
  int skuAmount;
  String skuCode;
  String skuName;
  int skuUnitAmount;
  String skuUnitName;
  String specDescription;
  int specUnitAmount;
  String specUnitName;
  List<String> tagList;
  int unitAmount;
  String unitName;
  int updateTimestamp;
  String virtualProductType;

  OfficialData(
      {this.approvalStatus,
        this.itemSku,
        this.labels,
        this.num,
        this.orderable,
        this.pdpVideoUrl,
        this.picture,
        this.priceData,
        this.productCode,
        this.productName,
        this.skuAmount,
        this.skuCode,
        this.skuName,
        this.skuUnitAmount,
        this.skuUnitName,
        this.specDescription,
        this.specUnitAmount,
        this.specUnitName,
        this.tagList,
        this.unitAmount,
        this.unitName,
        this.updateTimestamp,
        this.virtualProductType});

  OfficialData.fromJson(Map<String, dynamic> json) {
    approvalStatus = json['approvalStatus'];
    itemSku = json['itemSku'];
    labels = json['labels'].cast<String>();
    num = json['num'];
    orderable = json['orderable'];
    pdpVideoUrl = json['pdpVideoUrl'];
    picture = json['picture'];
    priceData = json['priceData'] != null
        ? new PriceData.fromJson(json['priceData'])
        : null;
    productCode = json['productCode'];
    productName = json['productName'];
    skuAmount = json['skuAmount'];
    skuCode = json['skuCode'];
    skuName = json['skuName'];
    skuUnitAmount = json['skuUnitAmount'];
    skuUnitName = json['skuUnitName'];
    specDescription = json['specDescription'];
    specUnitAmount = json['specUnitAmount'];
    specUnitName = json['specUnitName'];
    tagList = json['tagList'].cast<String>();
    unitAmount = json['unitAmount'];
    unitName = json['unitName'];
    updateTimestamp = json['updateTimestamp'];
    virtualProductType = json['virtualProductType'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['approvalStatus'] = this.approvalStatus;
    data['itemSku'] = this.itemSku;
    data['labels'] = this.labels;
    data['num'] = this.num;
    data['orderable'] = this.orderable;
    data['pdpVideoUrl'] = this.pdpVideoUrl;
    data['picture'] = this.picture;
    if (this.priceData != null) {
      data['priceData'] = this.priceData.toJson();
    }
    data['productCode'] = this.productCode;
    data['productName'] = this.productName;
    data['skuAmount'] = this.skuAmount;
    data['skuCode'] = this.skuCode;
    data['skuName'] = this.skuName;
    data['skuUnitAmount'] = this.skuUnitAmount;
    data['skuUnitName'] = this.skuUnitName;
    data['specDescription'] = this.specDescription;
    data['specUnitAmount'] = this.specUnitAmount;
    data['specUnitName'] = this.specUnitName;
    data['tagList'] = this.tagList;
    data['unitAmount'] = this.unitAmount;
    data['unitName'] = this.unitName;
    data['updateTimestamp'] = this.updateTimestamp;
    data['virtualProductType'] = this.virtualProductType;
    return data;
  }
}